﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="Pages_StateMain" Codebehind="StateMain.aspx.cs" MasterPageFile="~/Pages/Master/MainAdmin.Master" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
        <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        <fieldset id="pageLoad">
        <div id="fillInData">
            <h1>Estados</h1>
            <asp:GridView ID="gdvState" runat="server" AutoGenerateColumns="False" 
            DataKeyNames="Id" DataSourceID="objState" 
            onrowcommand="gdvState_RowCommand1" CellPadding="4" 
                Font-Size="Medium" ForeColor="#333333" GridLines="None" 
                Font-Names="Courier New" Width="50%" AllowPaging="True">
                <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Code" HeaderText="Code" SortExpression="Code" 
                    Visible="False" >
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Left" Width="5%" />
                </asp:BoundField>
                <asp:BoundField DataField="Name" HeaderText="Nome" SortExpression="Name" >
                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Left" Width="50%" />
                </asp:BoundField>
                <asp:BoundField DataField="Acronym" HeaderText="Sigla" 
                    SortExpression="Acronym" >

                <HeaderStyle HorizontalAlign="Center" />
                <ItemStyle HorizontalAlign="Center" Width="40%" />
                </asp:BoundField>

                <asp:TemplateField> 
                    <ItemTemplate>
                        <asp:LinkButton runat= "server"  ID="lbUpdate" CommandArgument='<%# Bind("ID") %>' CommandName="Update" ><img src="../../Images/Icon/EDITFILE_24x24.png" alt="Editar"/></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>

                <asp:TemplateField> 
                    <ItemTemplate>
                        <asp:LinkButton runat= "server"  ID="lbDelete" CommandArgument='<%# Bind("ID") %>' CommandName="Exclude" OnClientClick='javascript:return confirm("Confirma a exclusão deste estado ?")' ><img src="../../Images/Icon/EXCLUDEFILE_24x24.png" alt="Excluir" /></asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="5%" />
                </asp:TemplateField>

            </Columns>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />
        </asp:GridView>
        <asp:ObjectDataSource ID="objState" runat="server" SelectMethod="GetStates" 
            TypeName="br.com.SistemaChamados.Controller.StateController">
        </asp:ObjectDataSource>
        </div>
        </fieldset>
</asp:Content>
